package com.lq.ecoldchain.ui.withdraw.history

import com.lq.ecoldchain.base.CommonLoadingViewModel
import org.kodein.di.Kodein
import org.kodein.di.android.support.AndroidLifecycleScope
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance
import org.kodein.di.generic.scoped
import org.kodein.di.generic.singleton

/*
*2019/1/6 0006  15:54
*function by lq
*/
val withdrawHistorykodeinModle = Kodein.Module("Withdraw_History_Kodein_Module"){
    bind<WithdrawHistoryViewModel>() with scoped(AndroidLifecycleScope).singleton {
        WithdrawHistoryViewModel()
    }
    bind<WithdrawHistoryDelegate>() with scoped(AndroidLifecycleScope).singleton {
        WithdrawHistoryDelegate(
                viewModel =  instance(),
                loadingViewModel = CommonLoadingViewModel.instance(context)
        )
    }
}